package com.bus.core.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.json.JSONObject;

import com.bus.core.entity.base.BaseBusUserSite;

@Entity
@Table(name="jc_user_site")
public class BusUserSite extends BaseBusUserSite {
	private static final long serialVersionUID = 1L;
	
	public JSONObject convertToJson(){
		JSONObject json = new JSONObject();
		if (getId()!=null) {
			json.put("id", getId());
		}else{
			json.put("id", "");
		}
		if (getCheckStep()!=null) {
			json.put("checkStep", getCheckStep());
		}else{
			json.put("checkStep", "");
		}
		if (getAllChannel()!=null) {
			json.put("allChannel", getAllChannel());
		}else{
			json.put("allChannel", "");
		}
		return json;
	}

	/* [CONSTRUCTOR MARKER BEGIN] */
	public BusUserSite () {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public BusUserSite (java.lang.Integer id) {
		super(id);
	}

	public BusUserSite(Integer id, BusUser user, BusSite site, Byte checkStep,
			Boolean allChannel) {
		super(id, user, site, checkStep, allChannel);
		// TODO Auto-generated constructor stub
	}

	/**
	 * Constructor for required fields
	 */
	

	/* [CONSTRUCTOR MARKER END] */

}